package com.example.pluto.common.exceptions;

public class ServiceFallbackException extends RuntimeException {
    private static final long serialVersionUID = 3374472371045682364L;

    private Class<?> failBackClass;

    public ServiceFallbackException(Class<?> failBackClass) {
        this.failBackClass = failBackClass;
    }

    @Override
    public String getMessage() {
        if (failBackClass != null) {
            return failBackClass.getName() + "被降级了";
        }
        return super.getMessage();
    }
}
